﻿using System;
using System.Data;
using System.Data.SQLite;
using Microsoft.Win32;

namespace HYElectricCommon
{
	public class SqLiteHelper : Database
	{
		public static void SqlLiteDatabase(string ConnStr)
		{
			Database.dbCon = new SQLiteConnection(ConnStr);
			if (Database.dbCon.State == ConnectionState.Closed)
			{
				Database.dbCon.Open();
			}
		}

		public static string GetRegistData(string version)
		{
			return Registry.LocalMachine.OpenSubKey("SOFTWARE", true).OpenSubKey("Hongye", true).OpenSubKey("HYFamilyLib", true).OpenSubKey(version, true).GetValue("Location").ToString();
		}
	}
}
